package com.li.springbootproject.controller.data;

import java.util.List;

import com.li.springbootproject.domain.DataDto;
import com.li.springbootproject.service.data.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiDong
 * @version 1.0.0
 * @className DataController.java
 * @createTime 2021年07月18日 15:51:00
 */
@RestController
@RequestMapping("/data")
public class DataController {

    @Autowired
    private DataService dataService;

    @RequestMapping("/insert/datas")
    public void insertDatas(){
        dataService.insertDatas();
    }

    @RequestMapping("/insert/datatemp")
    public void insertDataTemp(){
        dataService.insertDataTemp();
    }

    @RequestMapping("/list/page")
    public List<DataDto> getPage(){
        return dataService.getPageList();
    }
}
